From: Florian Müllner Date: Thu, 11 Jul 2013 14:43:04 +0000 (+0200) Subject: modalDialog: Request HEIGHT_FOR_WIDTH X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3677 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=00ccbdaae9c74c32c28ec803579601ff1ac1914e;p=gnome-shell.git modalDialog: Request HEIGHT_FOR_WIDTH All our modal dialogs are given a fixed width and grow vertically as necessary. Set the request mode accordingly, so that wrapped labels are considered correctly during size request, and not only at allocation time (where they'll either take away from the padding or even cause the dialog to overflow). https://bugzilla.gnome.org/show_bug.cgi?id=704015 --- diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 40a696812..029cc410e 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -79,6 +79,11 @@ const ModalDialog = new Lang.Class({ this.dialogLayout = new St.BoxLayout({ style_class: 'modal-dialog', vertical: true }); + // modal dialogs are fixed width and grow vertically; set the request + // mode accordingly so wrapped labels are handled correctly during + // size requests. + this.dialogLayout.request_mode = Clutter.RequestMode.HEIGHT_FOR_WIDTH; + if (params.styleClass != null) this.dialogLayout.add_style_class_name(params.styleClass);